package cn.itcast.bos.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import cn.itcast.bos.domain.base.Standard;

public interface StandardRepository extends JpaRepository<Standard, Integer> {

	List<Standard> findByName(String name);

	List<Standard> findByNameLike(String string);

	List<Standard> findByMinWeight(int i);

	@Query(value="select s from Standard s where name =?")
	List<Standard> queryName(String string);

	@Query
	List<Standard> queryName2(String string);

	@Query(value="update Standard set minLength =?2 where id =?1")
	@Modifying
	void updateMinLength(int i, int j);

}
